package com.zhuss.controller.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.ListUserPublishBo;
import com.zhuss.bean.bo.core.append.DetailUserAppendBo;
import com.zhuss.bean.bo.core.append.SearchUserAppendBo;
import com.zhuss.common.AbstractBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.BasePageParam;
import com.zhuss.common.ReadService;
import com.zhuss.core.append.UserAppendReadServiceExt;
import com.zhuss.exception.WpsException;
import com.zhuss.opus.invit.InvitReadServiceExt;


/**
 * @description: 用户关注、点赞查询Controller
 * @author: zhushanshuo
 * @create: Fri Jul 03 20:49:22 CST 2020
 **/
@RestController
@RequestMapping("/userAppend")
public class UserAppendReadController extends BaseController {
	
	@Autowired
	@Qualifier("userAppendReadService")
	private ReadService<Object, Object> userAppendReadService;
	
	@Autowired
	@Qualifier("userAppendReadServiceExt")
	private UserAppendReadServiceExt userAppendReadServiceExt;
	
	@Autowired
	@Qualifier("invitReadServiceExt")
	private InvitReadServiceExt invitReadServiceExt;
	
	/**
	 * 详情
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/detail")
    public Object detail(@RequestBody DetailUserAppendBo bo) throws WpsException {
		
		Object result = userAppendReadService.detail(bo);
		return result;
    }
	
	/**
	 * 列表
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
    @RequestMapping("/list")
    public Object list(@RequestBody SearchUserAppendBo bo) throws WpsException {
		
		Object result = userAppendReadService.list(bo);
		return result;
    }
	
	/**
	 * 未读消息
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/noReadNum")
	public Object listAppend(@RequestBody AbstractBo bo) throws WpsException {
		
		Object result = invitReadServiceExt.noReadNum(bo);
		return result;
	}
	
	/**
	 * 粉丝
	 * 列表
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/listAppend")
	public Object listAppend(@RequestBody BasePageParam bo) throws WpsException {
		
		Object result = userAppendReadServiceExt.listAppend(bo);
		return result;
	}
	
	/**
	 * 点赞
	 * 列表
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/listThumbBy")
	public Object listThumbBy(@RequestBody BasePageParam bo) throws WpsException {
		
		Object result = invitReadServiceExt.listThumbBy(bo);
		return result;
	}
	
	/**
	 * 评论
	 * 列表
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/listTopicBy")
	public Object listTopicBy(@RequestBody BasePageParam bo) throws WpsException {
		
		Object result = invitReadServiceExt.listTopicBy(bo);
		return result;
	}
	
	/**
	 * 我的
	 * 列表
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/listMy")
	public Object listMy(@RequestBody BasePageParam bo) throws WpsException {
		
		Object result = invitReadServiceExt.listMy(bo);
		return result;
	}
	
	/**
	 * 我的
	 * 列表
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/listMyCollect")
	public Object listMyCollect(@RequestBody BasePageParam bo) throws WpsException {
		
		Object result = invitReadServiceExt.listMyCollect(bo);
		return result;
	}
	
	/**
	 * 别人的
	 * 列表
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/listUserPublish")
	public Object listUserPublish(@RequestBody ListUserPublishBo bo) throws WpsException {
		
		Object result = invitReadServiceExt.listUserPublish(bo);
		return result;
	}
	
}
